/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */
import React, { Component } from "react";
import PropTypes from "prop-types";

export default class BlockButton extends Component {
    render() {
        const dataAll = {
            style: {
                backgroundColor: this.props.bgColor,
                width: this.props.btnWidth,
                height: this.props.btnHeight,
                border: "none"
            },
            type: "button",
            onClick: this.props.onPress,
            className: this.props.className
        };

        return (
            <button {...dataAll}>
                <span
                    style={{
                        color: this.props.textColor,
                        fontSize: this.props.textSize
                    }}
                >
                    {this.props.btnName}
                </span>
            </button>
        );
    }
}

BlockButton.defaultProps = {
    btnName: "确定",
    bgColor: "#e6e6e6",
    textColor: "#444444",
    textSize: ".28rem",
    borderWidth: 1,
    bdColor: "#ddd"
};
